const { merge } = require('webpack-merge')
const common = require('./webpack.common')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')

module.exports = merge(common, {
  mode: 'production',
  devtool: false,
  plugins: [
    new HtmlWebpackPlugin({
      title: 'vue app base',
      template: './public/index.html',
      templateParameters: {
        BASE_URL: '/'
      }
    }),
    new CopyWebpackPlugin({
      patterns: ['public/favicon.ico']
    })
  ]
})
